Move track description up on level so it appears in the 'obvious' spot when
authorrobertl <robertl>
Thu, 19 Oct 2006 05:35:06 +0000 (05:35 +0000)
committerrobertl <robertl>
Thu, 19 Oct 2006 05:35:06 +0000 (05:35 +0000)
you click on it.

kml.c

diff --git a/kml.c b/kml.c
index e16b99dcbaae1ba66efea8aef2e5b5ac27b8013d..55ed3f56c0f83ac455c05be78c888a8fbfed7fcc 100644 (file)
--- a/kml.c
+++ b/kml.c
@@ -387,7 +387,7 @@ static void kml_output_timestamp(const waypoint *waypointp)
  * Output the track summary.
  */
 static 
-void kml_output_trkdescription(computed_trkdata *td)
+void kml_output_trkdescription(const route_head *header, computed_trkdata *td)
 {
        char *max_alt_units;
        double max_alt;
@@ -409,6 +409,9 @@ void kml_output_trkdescription(computed_trkdata *td)
        kml_write_xml(1, "<description>\n");
        kml_write_xml(1, "<![CDATA[<table>\n");
 
+       if (header->rte_desc) {
+               TD("<b>Description</b> %s", header->rte_desc);
+       }
        TD2("<b>Distance</b> %.1f %s", distance, distance_units);
        if (min_alt != unknown_alt) {
                TD2("<b>Min Alt</b> %.1f %s", min_alt, min_alt_units);
@@ -447,13 +450,12 @@ void kml_output_header(const route_head *header, computed_trkdata*td)
 {
         kml_write_xml(1,  "<Folder>\n");
        kml_write_xmle("name", header->rte_name);
-       kml_write_xmle("description", header->rte_desc);
+       kml_output_trkdescription(header, td);
 
         if (export_points && header->rte_waypt_ct > 0) {
           // Put the points in a subfolder
           kml_write_xml(1,  "<Folder>\n");
           kml_write_xml(0,  "<name>Points</name>\n");
-         kml_output_trkdescription(td);
         }
 
         // Create an array for holding waypoint coordinates so that we